//
//  firstViewController.m
//  FangXinLang
//
//  Created by AJY on 16/9/18.
//  Copyright © 2016年 AJY. All rights reserved.
//

#import "firstViewController.h"
#import "MainViewController.h"

@interface firstViewController ()

@property (nonatomic,strong) UIButton * btn;

@end

@implementation firstViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.btn = [[UIButton alloc]initWithFrame:[UIScreen mainScreen].bounds];
    [_btn setImage:[UIImage imageNamed:@"guideImageBg_736@3x"] forState:UIControlStateNormal];
    [_btn addTarget:self action:@selector(changeRootViewController:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:_btn];
}
//点击的方法
- (void)changeRootViewController:(UIButton *)button{
    UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow;
    keyWindow.rootViewController = [[MainViewController alloc] init];
    //    scrollView资源包信息的字典，通过objectForKey来建值kCFBundleVersionKey获取版本号
    //NSString *nowVersion =[[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleVersionKey];
//    //    立即执行
//    NSUserDefaults *userDefau = [NSUserDefaults standardUserDefaults];
//    [userDefau setObject:nowVersion forKey:@"APP_VERSION"];
//    [userDefau synchronize];
}

@end
